<div class="dialog">
    <table>
        <tbody>
        
            
            <tr class="prop">
                <td valign="top" class="name"><g:message code="marketPriceApproval.region" default="Region" />:</td>
                <td valign="top" class="value"><g:link controller="region" action="show" id="${marketPriceApprovalInstance?.region?.id}">${marketPriceApprovalInstance?.region?.encodeAsHTML()}</g:link></td>
            
                <td valign="top" class="name"><g:message code="marketPriceApproval.date" default="Date" />:</td>
                <td valign="top" class="value"><g:formatDate date="${marketPriceApprovalInstance?.date}" format="yyyy-MM-dd"/></td>
            
                <td valign="top" class="name"><g:message code="marketPriceApproval.approved" default="Approved" />:</td>
                <td valign="top" class="value"><g:formatBoolean boolean="${marketPriceApprovalInstance?.approved}" /></td>
            
            <tr class="prop">
                <td valign="top" class="name"><g:message code="marketPriceApproval.dateCreated" default="Date Created" />:</td>
                <td valign="top" class="value"><g:formatDate date="${marketPriceApprovalInstance?.dateCreated}" format="yyyy-MM-dd HH:mm:ss"/></td>
            
                <td valign="top" class="name"><g:message code="marketPriceApproval.lastUpdated" default="Last Updated" />:</td>
                <td valign="top" class="value"><g:formatDate date="${marketPriceApprovalInstance?.lastUpdated}" format="yyyy-MM-dd HH:mm:ss"/></td>

                <td valign="top" class="name">&nbsp;</td>
                <td valign="top" class="value">&nbsp;</td>
            </tr>
            
        </tbody>
    </table>
</div>
<div class="list">
    <table>
        <thead>
            <tr>
                <th><g:message code="marketPriceApprovalDetail.serialNumber" default="serialNumber" /></th>
                <th><g:message code="marketPriceApprovalDetail.product" default="Product" /></th>
                <th><g:message code="marketPriceApprovalDetail.purchaseprice" default="Purchase Price" /></th>
                <th><g:message code="marketPriceApprovalDetail.systemPrice" default="System Price" /></th>
                <th><g:message code="marketPriceApprovalDetail.regionPrice" default="Region Price" /></th>
           </tr>
        </thead>
        <tbody>
        <g:each in="${marketPriceApprovalInstance?.details?.sort{it?.serialNumber}}" status="i" var="marketPriceApprovalDetailInstance">
            <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                <td>${fieldValue(bean: marketPriceApprovalDetailInstance, field: "serialNumber")}</td>
                <td>${fieldValue(bean: marketPriceApprovalDetailInstance, field: "product")}</td>
                <td><g:formatNumber number="${marketPriceApprovalDetailInstance.purchasePrice}" format="###,##0.00"/></td>
                <td><g:formatNumber number="${marketPriceApprovalDetailInstance.systemPrice}" format="###,##0.00"/></td>
                <td><g:formatNumber number="${marketPriceApprovalDetailInstance.regionPrice}" format="###,##0.00"/></td>
            </tr>
        </g:each>
        </tbody>
    </table>
</div>
